#ifndef LOG_H
#define LOG_H

#include <stdarg.h>

#define LOG_FILE "/tmp/xwebos.log"


#define LOG_ERROR 0x1
#define LOG_WARN 0x10
#define LOG_INFO 0x100

#ifdef DEBUG
#define debug(format, ...) \
    fprintf(stderr, "DEBUG:%s:%d ", __FILE__, __LINE__);\
    fprintf(stderr, format, ##__VA_ARGS__)
#else 
#define debug(format, ...) 
#endif

int ini_log();
void print_log(int level, const char* format, ...);

#endif
